package com.allianz.webapps.controllers;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.io.FileUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;

import com.fasterxml.jackson.annotation.JsonFormat.Value;

@Controller
@RequestMapping(value = "plan")
public class PlanController {
	
	/**
	 * 建议书一览
	 */
	@RequestMapping(value = "proposalNew")
	public ModelAndView proposalNew(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposalNew");
		return mav;
	}
	
	/**
	 * 修改建议书
	 */
	@RequestMapping(value = "proposalEdit") 
	public ModelAndView proposalEdit(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposalEdit");
		return mav;
	}
	
	/**
	 * 建议书书架
	 */
	@RequestMapping(value = "proposalMange")
	public ModelAndView proposalMange(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposalMange");
		return mav;
	}
	
	/**
	 * 预览建议书
	 */
	@RequestMapping(value = "proposalPreview")
	public ModelAndView proposalPreview(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposalPreview");
		return mav;
	}
	
	/**
	 * 按日期排序
	 */
	@RequestMapping(value = "proposalMangeDate")
	public ModelAndView proposalMangeDate(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposalMangeDate");
		return mav;
	}
	
	/**
	 * 按名称排序
	 */
	@RequestMapping(value = "proposalMangeName")
	public ModelAndView proposalMangeName(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposalMangeName");
		return mav;
	}
	
	/**
	 * 列表显示
	 */
	@RequestMapping(value = "proposalMangeList")
	public ModelAndView proposalMangeList(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposalMangeList");
		return mav;
	}
	
	/**
	 * 选择建议书组成部分
	 */
	@RequestMapping(value = "proposal")
	public ModelAndView proposal(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/proposal");
		return mav;
	}
	
	/**
	 * 微信预览
	 */
	@RequestMapping(value = "shareWechat")
	public ModelAndView shareWechat(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("views/page/shareWechat");
		return mav;
	}
	
	
	/**
	 * 建议书 添加主险
	 */
	@RequestMapping(value="addMainPro")
	public String index(HttpServletRequest request,HttpServletResponse response){
		return "views/page/addMainPro";
	}
	
	
}
